package soul.mapper;

import soul.entity.Meta;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Update;

import java.util.List;
import java.util.Map;

/**
 * Created by admin on 2016/11/26.
 */
public interface MetaDao {

    @Insert("insert into om_mates (id,name,phone_no,employer,city,status,graduation_year,major,org_id,create_dt) values(#{id},#{name}" +
            ",#{phoneNo},#{employer},#{city},#{status},#{graduationYear},#{major},#{orgId},#{createDt})")
    int add(Meta meta);

    List<Meta> select(Map<String, Object> param);

    @Update("update om_mates set status=1 where id=#{id}")
    int confirm(Meta meta);

    @Delete("delete from om_mates where id=#{id}")
    int delete(Meta meta);
}
